#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    vector<int> multiply(const vector<int>& A)
    {
        if (A.size() <= 1)
        {
            return  A;
        }
        int n = A.size();
        int i = 0, j = 0;
        vector<int> res(n, 1);
        for (i = 0; i < n; i++)
        {
            for (j = 0; j < n; j++)
            {
                if (i != j)
                {
                    res[i] *= A[j];
                }
            }
        }
        return res;
    }
};
void main()
{
    vector<int> v = { 1,2,3,4,5 };
    Solution S;
    S.multiply(v);

}